import request from '@/utils/request'

// 查询轮播图列表
export function listWxSlide(query) {
  return request({
    url: '/wx/wxSlide/list',
    method: 'get',
    params: query
  })
}

// 查询轮播图详细
export function getWxSlide(id,goodsName) {
  console.log(id,goodsName)
  return request({
    url: '/wx/wxSlide/' + id+'&'+(goodsName||''),
    method: 'get'
  })
}

// 查询轮播图详细
export function getGoodsList(goodsName) {
  return request({
    url: '/wx/wxSlide/getGoods/' + goodsName,
    method: 'get'
  })
}

// 新增轮播图
export function addWxSlide(data) {
  return request({
    url: '/wx/wxSlide',
    method: 'post',
    data: data
  })
}

// 修改轮播图
export function updateWxSlide(data) {
  return request({
    url: '/wx/wxSlide',
    method: 'put',
    data: data
  })
}

// 删除轮播图
export function delWxSlide(id) {
  return request({
    url: '/wx/wxSlide/' + id,
    method: 'delete'
  })
}

// 导出轮播图
export function exportWxSlide(query) {
  return request({
    url: '/wx/wxSlide/export',
    method: 'get',
    params: query
  })
}